package com.office.stacks.center.service.impl;

import java.util.List;

import com.office.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.office.stacks.center.mapper.TasksCenterMapper;
import com.office.stacks.center.domain.TasksCenter;
import com.office.stacks.center.service.ITasksCenterService;

/**
 * 任务中心Service业务层处理
 *
 * @author 柒月
 * @date 2025-05-27
 */
@Service
public class TasksCenterServiceImpl implements ITasksCenterService {
    @Autowired
    private TasksCenterMapper tasksCenterMapper;

    /**
     * 查询任务中心列表
     *
     * @param tasksCenter 任务中心
     * @return 任务中心
     */
    @Override
    public List<TasksCenter> selectTasksCenterList(TasksCenter tasksCenter) {
        return tasksCenterMapper.selectTasksCenterList(tasksCenter);
    }

    /**
     * 接下任务
     *
     * @param ids    会议ids
     * @param fileId 文件id
     * @return 结果
     */
    @Override
    public Integer updateTasksCenterTake(Long ids, Long fileId) {
        // 获取当前登录用户
        Long loginUserId = SecurityUtils.getUserId();
        //
        return tasksCenterMapper.updateTasksCenterTake(ids,loginUserId,fileId);
    }
}
